<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>添加权限</title>
    <link rel="stylesheet" href="/static/lib/layuiadmin/plugins/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/static/lib/layuiadmin/css/global.css" media="all">
    <link rel="stylesheet" href="/static/lib/layuiadmin/plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/lib/layuiadmin/css/table.css" />
</head>

<body>
<div class="admin-main">

    <div style="margin: 15px;">
        <form class="layui-form" method="post" action="/admin/role/create">
            <div class="layui-form-item">
                <label class="layui-form-label">角色名称</label>
                <div class="layui-input-block">
                    <input type="text" name="name" required lay-verify="required" placeholder="请输入角色名称" autocomplete="off" class="layui-input">
                </div>
            </div>

            <fieldset class="layui-elem-field">
                <legend>权限选择</legend>
                <{volist name="permissions" id="item" }>
                <div class="layui-form-item">
                    <label class="layui-form-label"><{$key}></label>
                    <div class="layui-input-block">
                        <{volist name="item" id="permission"}>
                        <input type="checkbox" name="permission[<{$permission.mark}>]" title="<{$permission.name}>">
                        <{/volist}>
                    </div>
                </div>
                <{/volist}>
            </fieldset>



            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button lay-filter="add" lay-submit class="layui-btn">提交</button><a href="/admin/role/index" class="layui-btn layui-btn-danger">返回</a>
                </div>
            </div>
        </form>
    </div>

</div>
<script type="text/javascript" src="/static/lib/layuiadmin/plugins/layui/layui.js"></script>
<script type="text/javascript">
    layui.use('form', function(){
        var form = layui.form();
    });
</script>

</body>

</html>